import React, {FC} from 'react';
import "./index.less";
import HxKwNavs from "@/components/HxKwNavs";
import {history} from "@@/core/history";
import {Outlet, useLocation} from "@@/exports";
import {FormattedMessage} from "umi";

interface SysMsgProps {
}

/**
 * 系统消息 页面
 */
const SysMsg: FC<SysMsgProps> = (props) => {
  const location = useLocation();
  return (
    <div className={"sysmsg-container"}>
      <HxKwNavs
        className={"sysmsg-kw-navs"}
        value={location.pathname}
        onChange={(value) => {
          history.push({
            pathname: value,
          });
        }}
        items={[
          {key: "/mine/sysmsg/unread", label: <FormattedMessage id="mine.sysmsg.unread" />},
          {key: "/mine/sysmsg/all", label: <FormattedMessage id="mine.sysmsg.all" />},
        ]}
      >
        <Outlet/>
      </HxKwNavs>
    </div>
  );
};

export default SysMsg;
